package com.ziyun.pop.web;

import com.ziyun.admin.web.config.ShiroConfig;

import lombok.extern.slf4j.Slf4j;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

@Slf4j
@ComponentScan(basePackages= {"io.renren.*", "com.ziyun.pop.*","com.ziyun.admin.web.*","com.service.pay.*","com.service.ucenter.*"},
				excludeFilters={@ComponentScan.Filter(type= FilterType.ASSIGNABLE_TYPE, value=ShiroConfig.class)
})
@MapperScan(basePackages = {"io.renren.modules.*.dao","com.ziyun.pop.modules.*.dao","com.service.ucenter.dao.mapper"})
@EnableFeignClients(basePackages = {"com.service.ucenter.api","com.service.goods.api","com.service.order.api"})
@SpringBootApplication
@EnableEurekaClient
@EnableCaching
public class ZiYunPopApplication extends SpringBootServletInitializer {

	public static void main(String[] args) {
		SpringApplication.run(ZiYunPopApplication.class, args);
		log.info(">>>>> Ziyun-POP 启动完成 <<<<<");
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(ZiYunPopApplication.class);
	}
}

